package statemachine;

/**
 * 测试类
 * 
 * @author guweiqiang
 * 2018年7月4日
 */
public class StateMachineTest {

	public static void main(String[] args) {
		Machine machine = new Machine(10);
		for (int i=0; i<12; i++) {
			System.out.println(i+": 当前糖果数量：" + machine.getCount());
			if(i==5) {
				machine.insertCoin();
				machine.ejectCoin();
				continue;
			}
			machine.insertCoin();
			machine.turnCrank();
		}

	}

}
